1. Field of the Invention
The present invention relates to an imaging device and an imaging method using the imaging device. In particular, this invention relates to an imaging device which is configured to perform automatic focus detection in accordance with a brightness of a subject, and to an imaging method using the imaging device.
2. Description of the Related Art
Generally, an automatic focus (AF) device that automatically focuses on a subject is installed in an electronic imaging device such as a digital still camera. Conventionally, as a control method of an AF device, a so-called “hill climbing AF control” is known, for example, in JP S39-5265 B.
Hereinafter, this hill climbing AF control method is explained simply.
This method is used to acquire an integration value of high frequency components or brightness differences in adjacent pixels, from image signals obtained per one field or one frame, and determine the integration value of the brightness differences as an AF evaluation value which represents a focusing level. In this method, when a photographing lens is in an in-focus state, the AF evaluation value increases because an edge part of the subject is clear, and the AF evaluation value becomes small when the photographing lens is out of focus. When AF operation is carried out, while moving the photographing lens, the AF evaluation value is obtained sequentially, and at the position where the AF evaluation value becomes largest, i.e. a peak position which is regarded as a focus point, the photographing lens is stopped.
Meanwhile, in a device which images a still image, such as a digital still camera, accurate focusing is generally required, compared to a device which photographs a moving image such as a video camera; therefore, AF operations are carried out per photographing operation, and in recording mode focusing operations are always repeatedly carried out.
However, when the brightness is low, or when a subject having low contrast is photographed, a top of the peak of the AF evaluation value becomes low, or noise is generated in the AF evaluation value data due to the low contrast and thus a plurality of tops of the peak appear; therefore, a problem arises in that an excellent in-focus state can not be obtained.
In response to the conventional problems, for example, JP 2003-230039A proposes a method that outputs a brightness data in accordance with a digital image data as an automatic exposure (AE) evaluation value, and when the AE evaluation value is smaller than a certain predetermined value, i.e. when the subject is dark, enlarges an area where an AF evaluation value is acquired to carry out an AF control.
However, for the method disclosed in JP 2003-230039A, a problem arises in that if the area where the AF evaluation value is acquired is improperly enlarged, a photographing background is influenced, and thus the focusing is not carried out on the subject that the photographer intended, but for example on the background.
Moreover, JP 2003-289467A proposes a method which makes it possible to carry out an accurate focusing without the influence of brightness of an image, by making a histogram from a brightness signal of the image, setting a gamma table based on the histogram, and performing a gamma correction.
However, in this method, a plurality of the gamma tables suitable for the environment should be prepared, and the processing operation becomes complicated, so that a demand for a method with which it is possible to carry out the focusing accurately with fewer gamma tables has increased.
In addition, though contrast increases by the gamma correction, it is understood that a black stretch occurs in a subject when the brightness is low; therefore, a method in which the gamma correction is not carried out when the brightness is low is considered to be more preferable.